package com.netx.generics.basic;


public class SynchronizedLogger implements Logger {

	private final Logger _logger;
	
	public SynchronizedLogger(Logger logger) {
		Checker.checkNull(logger, "logger");
		_logger = logger;
	}
	
	public synchronized LEVEL getLevel() {
		return _logger.getLevel();
	}

	public synchronized void setLevel(LEVEL l) {
		_logger.setLevel(l);
	}

	public synchronized void info(String message) {
		_logger.info(message);
	}

	public synchronized void warning(String message) {
		_logger.warning(message);
	}

	public synchronized void warning(String message, Throwable t) {
		_logger.warning(message, t);
	}

	public synchronized void error(String message, Throwable t) {
		_logger.error(message, t);
	}

	public synchronized void error(Throwable t) {
		_logger.error(t);
	}
}
